<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<script src="${pageContext.request.contextPath}/js/MyConverter.js"></script>
<script src="${pageContext.request.contextPath}/js/jquery.cookie.js"></script>
<script>
    $(function () {
        $("#userAvatar").attr("src",$.cookie('avatar_url'));
        $("#userName").text($.cookie('name'));
        $("#userRole").text(CON_ROLE[$.cookie('role')]);

        //下拉菜单处理
        var profile = $(".profile_details");
        var downMenu = $(".dropdown-menu");

        profile.mouseover(function () {
            downMenu.show();
        }).mouseout(function () {
            downMenu.hide();
        });

        downMenu.mouseover(function () {
            downMenu.show();
        }).mouseout(function () {
            downMenu.hide();
        });
    })
</script>
<div class="header-main">
    <div class="logo-w3-agile">
        <h1><a href="${pageContext.request.contextPath}/backdoor/index">法援社区后台</a></h1>
    </div>
    <div class="w3layouts-left">

        <!--search-box-->
        <div class="w3-search-box">
            <form>
                <input type="text" placeholder="搜索用户或话题" id="bdcsMain">
                <input type="submit" value="">
            </form>
        </div>
        <!--//end-search-box-->
        <div class="clearfix"></div>
    </div>
    <div class="w3layouts-right">
        <div class="profile_details_left">
            <!--notifications of menu start -->
            <ul class="nofitications-dropdown">
                <li class="dropdown head-dpdn">
                    <a href="${pageContext.request.contextPath}/backdoor/userManager" class="dropdown-toggle">
                        <i class="fa fa-envelope"></i><span class="badge">6</span>
                    </a>
                </li>
                <li class="dropdown head-dpdn">
                    <a href="${pageContext.request.contextPath}/backdoor/illegalities" class="dropdown-toggle">
                        <i class="fa fa-bell"></i><span class="badge blue">3</span>
                    </a>
                </li>
                <li class="dropdown head-dpdn">
                    <a href="${pageContext.request.contextPath}/backdoor/calendar" class="dropdown-toggle">
                        <i class="fa fa-tasks"></i><span class="badge blue1 hidden">0</span>
                    </a>
                </li>
                <div class="clearfix"></div>
            </ul>
            <div class="clearfix"></div>
        </div>
        <!--notification menu end -->

        <div class="clearfix"></div>
    </div>
    <div class="profile_details w3l">
        <ul>
            <li class="dropdown profile_details_drop">
                <a href="#" class="dropdown-toggle">
                    <div class="profile_img">
                        <span class="prfil-img">
                            <img id="userAvatar" src="">
                        </span>
                        <div class="user-name">
                            <p id="userName"></p>
                            <span id="userRole"></span>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                </a>
                <ul class="dropdown-menu drp-mnu">
                    <li>
                        <a href="${pageContext.request.contextPath}/index"><i class="fa fa-sign-out"></i> 退出</a>
                    </li>
                </ul>
            </li>
        </ul>
    </div>

    <div class="clearfix"></div>
</div>
